package com.dd.cloud.user.entity.chknowl;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author xt
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "视频小节")
public class ChknowlChVideoChapter implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;

    /**
     * 小节名称
     */
    @Column(length = 32, comment = "小节名称")
    private String name;

    /**
     * 小节排序
     */
    @Column(comment = "排序")
    private Integer sort;

    /**
     * 课程id
     */
    @Column(comment = "课程id")
    private Integer videoId;

    /**
     * 视频url
     */
    @Column(comment = "视频url",length = 512)
    private String chapterUrl;

    /**
     * 状态
     */
    @Column(comment = "状态 1.正常 -1.删除")
    private Integer status;


    /**
     * 创建时间
     */
    @Column(comment = "创建时间")
    private LocalDateTime createdDate;


    /**
     *是否为最后一次观看
     */
    @TableField(exist = false)
    private Integer isLast;

    /**
     *观看时长
     */
    @TableField(exist = false)
    private String time;

}
